#ifndef _ENCODER_PWM_H__
#define _ENCODER_PWM_H__

/* must be include from enc_hw_intf.h */

typedef struct {
	float pwm_duty;
	float pwm_pulse_cnt;
	u32 duty_errors;
	init_pos_callback cb;
	void *ctx;
}enc_pwm_t;
extern enc_pwm_t enc_pwm_;

__STATIC_INLINE float enc_abs_count(void) {
	return enc_pwm_.pwm_pulse_cnt;
}

#endif /* _ENCODER_PWM_H__ */


